/*
 * StateChecker checks to see if a given player is in check,checkmate,or stalemate
 */

#ifndef BOARDSTATECHECKER_H_
#define BOARDSTATECHECKER_H_

class Board;
class MoveChecker;
#include "Piece.h"


enum BoardCondition{NORMAL,CHECK,CHECKMATE,STALEMATE};	//Enumeration defining board states

class StateChecker{
private:
	Board *board;					//Pointer to board
	MoveChecker *moveChecker;		//Pointer to MoveChecker
	bool isCheck(Color player);		//Returns true if a given player is in check
	bool isCheckmate(Color player);	//Returns true if a given player is in checkmate
	bool isStalemate(Color player);	//Returns true if a given player is in stalemate
public:
	StateChecker(Board *_board,MoveChecker *checker);	//Constructor
	~StateChecker();									//Deconstructor
	BoardCondition getState(Color player);				//Returns the state of a given player
};

#endif /* BOARDSTATECHECKER_H_ */
